const request = (params) => {
  return new Promise((resolve, reject) => {
    const baseUrl = 'https://api-hmugo-web.itheima.net/api/public/v1'
    uni.request({
      ...params,
      url:baseUrl+params.url,
      success: (res) => {
       resolve(res.data.message)
      },
      fail: (err) => {
        reject(err)
      }
    });
  })
}
export default request
